home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Frontier 4.2.3 / Misc Stuff / FileMaker Verb Docs < prev    next >
Text File  |  1996-10-30  |  33KB  |  637 lines

  1.  
  2. Verb    FilemakerLib.bringDBToFront
  3. Syntax    FilemakerLib.bringDBToFront (db, theLayout = 0)
  4. Parameters    db is the name or number of the database you want to make frontmost.
  5. theLayout (optional parameter) is the name or number of the layout.
  6. Action    Makes the specified database the frontmost window in Filemaker.
  7. Returns    True if the database was brought to front, false if the request failed.
  8. Examples    FilemakerLib.bringDBToFront ("My Database") «Brings database "My Database" to front
  9.     » true
  10. FilemakerLib.bringDBToFront ("U.S. States", 2) «Brings database to front and displays layout 2
  11.     » true
  12. FilemakerLib.bringDBToFront ("U.S. States", "One Page Per State") «Brings database to front and displays layout named "One Page Per State"
  13.     » true
  14. FilemakerLib.bringDBToFront ("Non-existent database")
  15.     » false
  16. Notes    This is a rarely-needed verb. The FilemakerLib verbs do not require the acted-upon database to be frontmost.
  17. See Also    FilemakerLib.bringToFront
  18. FilemakerLib.hideWindow
  19. FilemakerLib.showWindow
  20. FilemakerLib.getFrontDBName
  21.  
  22. Verb    FilemakerLib.bringToFront
  23. Syntax    FilemakerLib.bringToFront ()
  24. Parameters    None.
  25. Action    Makes Filemaker the frontmost application.
  26. Returns    True if the command succeeds, false if it does not.
  27. Examples    FilemakerLib.bringToFront () «Brings Filemaker to front
  28.     » true
  29. Notes    If Filemaker Pro is not already running, calling this verb will launch it.
  30. See Also    FilemakerLib.bringDBToFront
  31. FilemakerLib.hideWindow
  32. FilemakerLib.showWindow
  33. FilemakerLib.getFrontDBName
  34.  
  35. Verb    FilemakerLib.close
  36. Syntax    FilemakerLib.close (db)
  37. Parameters    db is the name or number of the database to close.
  38. Action    Closes the specified database.
  39. Returns    True if successful, false if failed.
  40. Examples    FilemakerLib.close (1) «Closes the frontmost database
  41.     » true
  42. FilemakerLib.close ("My Database") «Closes database "My Database"
  43.     » true
  44. See Also    FilemakerLib.open
  45. FilemakerLib.quit
  46. FilemakerLib.hideWindow
  47. FilemakerLib.showWindow
  48.  
  49. Verb    FilemakerLib.countRecords
  50. Syntax    FilemakerLib.countRecords (db, foundSet = true)
  51. Parameters    db is the name or number of the database containing the records to count.
  52. foundSet (optional parameter) is a boolean. True to count only the current found set, false to count the entire database.
  53. Action    Counts the number of records specified.
  54. Returns    The number of records, or false if the request could not be performed.
  55. Examples    FilemakerLib.countRecords ("U.S. States", false) «Counts number of records in database "U.S. States"
  56.     » 50
  57.  
  58. Verb    FilemakerLib.dbIsOpen
  59. Syntax    FilemakerLib.dbIsOpen (db)
  60. Parameters    db is the name or number of the database that may or not be open.
  61. Returns    True if the database is open, false if it is not or if the request fails.
  62. Examples    FilemakerLib.dbIsOpen ("My Database") «This database is open.
  63.     » true
  64. FilemakerLib.dbIsOpen ("Non-existent database")
  65.     » false
  66. See Also    FilemakerLib.open
  67. FilemakerLib.close
  68.  
  69. Verb    FilemakerLib.deleteAllRecords
  70. Syntax    FilemakerLib.deleteAllRecords (db, foundSet = true)
  71. Parameters    db is the name or number of the database containing the records to delete.
  72. foundSet is a boolean, true by default.
  73. Action    Deletes records in the database, either all records or all records in the current found set.
  74. Returns    True if the records were deleted, false if not.
  75. Examples    FilemakerLib.deleteAllRecords ("My Database", false) «"My Database" is now empty of data
  76.     » true
  77. FilemakerLib.bringDBToFront ("U.S. States") «Deletes only records in the current found set.
  78.     » true
  79. Notes    This is a dangerous verb. There is no undo for deleted records. Pay special attention to whether or not you want the found set’s or the entire database’s records deleted.
  80. See Also    FilemakerLib.deleteRecord
  81.  
  82. Verb    FilemakerLib.deleteRecord
  83. Syntax    FilemakerLib.deleteRecord (db, recordNum, foundSet = true)
  84. Parameters    db is the name or number of the database containing a record to delete.
  85. recordNum is the index of the record you want to delete.
  86. foundSet (optional, default is true) specifies whether the record is the nth record in the current found set (true) or in the database (false).
  87. Action    Deletes the specified record.
  88. Returns    True if the record was deleted, false if it was not.
  89. Examples    FilemakerLib.deleteRecord ("U.S. States", 1, false) «"Alabama" has been deleted: now there are 49 states in the database.
  90.     » true
  91. Notes    This is a dangerous verb. There is no undo for deleting a record. Pay special attention to whether or not you want the found set’s or the entire database’s record deleted.
  92. See Also    FilemakerLib.deleteAllRecords
  93.  
  94. Verb    FilemakerLib.find
  95. Syntax    FilemakerLib.find (db, searchStringList, cellList, theLayout = 0)
  96. Parameters    db is the name or number of the database in which to find records.
  97. searchStringList is a string or a list of search strings.
  98. cellList is a string or a list of cells to be searched. There is a one-to-one correspondence between strings in searchStringList and cellList.
  99. theLayout (optional, default is 0) specifies the layout on which to perform the find.
  100. Action    Sets the current found set to records matching your find parameters.
  101. Returns    The number of records in the current found set (0 or more) or false if for some reason the request could not be performed.
  102. Examples    FilemakerLib.find ("U.S. States", "Columbia", "State Name") «Find states named "Columbia" in the "U.S. States" database.
  103.     » 0
  104. FilemakerLib.find ("U.S. States", {"Mary", "Ann"}, {"State Name", "State Capital"}) «Finds states whose name contains "Mary" and whose capital contains "Ann"
  105.     » 1
  106. Notes    This verb is a reliable method of performing Filemaker finds. It is faster on large databases than FilemakerLib.simpleFind.
  107. This verb sends, at a minimum, five Apple events. The more fields to search, the more Apple events sent.
  108. See Also    FilemakerLib.findAll
  109. FilemakerLib.simpleFind
  110.  
  111. Verb    FilemakerLib.findAll
  112. Syntax    FilemakerLib.findAll (db)
  113. Parameters    db is the name or number of the database whose current found set should include all records.
  114. Action    Causes the current found set to contain all records.
  115. Returns    True if successful, false otherwise.
  116. See Also    FilemakerLib.find
  117.  
  118. Verb    FilemakerLib.getAllRecords
  119. Syntax    FilemakerLib.getAllRecords (db, theLayout = 0, foundSet = true)
  120. Parameters    db is the name or number of the database containing the records to retrieve.
  121. theLayout (optional, default is 0) is the name or number of the layout.
  122. foundSet (optional, default is true) specifies whether to retrieve all records in the foundSet (true) or in the entire database (false).
  123. Action    Retrieves all records in either the current found set or the entire database.
  124. Returns    A list of Filemaker records, or false if there are no records present.
  125. Examples    FilemakerLib.getAllRecords ("U.S. States", foundSet: false)
  126.     » {("Alabama", "Huntsville", "Lobster"}, {"Alaska", "Juneau", "Crabs"},...}
  127. See Also    FilemakerLib.getFirstRecord
  128. FilemakerLib.getLastRecord
  129. FilemakerLib.getNthRecord
  130. FilemakerLib.getNRecords
  131.  
  132. Verb    FilemakerLib.getCellByRecordID
  133. Syntax    FilemakerLib.getCellByRecordID (db, theCell, recordID, theLayout = 0)
  134. Parameters    db is the name or number of the database containing the records and cells.
  135. theCell is the name of the cell containing the data to retrieve.
  136. recordID is the unique ID of the record.
  137. theLayout (optional, default is 0) specifies the layout.
  138. Action    Retrieves data from the specified cell in the specified record.
  139. Returns    The data if successful, false if the request failed.
  140. Examples    FilemakerLib.getCellByRecordID ("U.S. States", "State Name", 3)
  141.     » "Ohio"
  142. See Also    FilemakerLib.setCellByRecordID
  143. FilemakerLib.getRecordByID
  144. FilemakerLib.setRecordByID
  145. FilemakerLib.getID
  146.  
  147. Verb    FilemakerLib.getCellNames
  148. Syntax    FilemakerLib.getCellNames (db, theLayout = 0)
  149. Parameters    db is the name or number of the database containing the cells.
  150. theLayout (optional parameter) is the name or number of the layout.
  151. Action    Retrieves the names of the cells from Filemaker.
  152. Returns    A list of cell names if successful, false if the request failed.
  153. Examples    FilemakerLib.getCellNames ("U.S. States")
  154.     » {"State Name", "State Capital", "Seafood specialty"}
  155. Notes    Cell names are returned in the cell’s creation order. Use this same order when setting data.
  156. See Also    FilemakerLib.getLayoutNames
  157. FilemakerLib.getFrontDBName
  158.  
  159. Verb    FilemakerLib.getCellNRecords
  160. Syntax    FilemakerLib.getCellNRecords (db, theCell, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true)
  161. Parameters    db is the name or number of the database containing the cells to retrieve.
  162. theCell is the name of the cell to retrieve.
  163. firstRecord is the index of the first record.
  164. numRecordsToGet is the number of records from which to retrieve the cell.
  165. theLayout (optional, default is 0) is the name or number of the layout.
  166. foundSet (optional, default is true) determines whether the firstRecord applies to the current found set (true) or to the database (false).
  167. Action    Retrieves the data for named cell from multiple records.
  168. Returns    A list of data if the request is successful, false otherwise.
  169. Examples    FilemakerLib.getCellNRecords ("U.S. States", "State Name", 1, 2, foundSet:false) «Retrieve state names
  170.     » {"Alabama", "Alaska"}
  171. FilemakerLib.getCellNRecords ("U.S. States", 40, 15) «Ask for records that don’t exist
  172.     » false
  173. See Also    FilemakerLib.getCellNRecordsAsString
  174. FilemakerLib.setCellNRecords
  175.  
  176. Verb    FilemakerLib.getCellNRecordsAsString
  177. Syntax    FilemakerLib.getCellNRecordsAsString (db, theCell, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true)
  178. Parameters    db is the name or number of the database containing the cells to retrieve.
  179. theCell is the name of the cell to retrieve.
  180. firstRecord is the index of the first record.
  181. numRecordsToGet is the number of records from which to retrieve the cell.
  182. theLayout (optional, default is 0) is the name or number of the layout.
  183. foundSet (optional, default is true) determines whether the firstRecord applies to the current found set (true) or to the database (false).
  184. Action    Retrieves the data for named cell from multiple records.
  185. Returns    The data as a string if the request is successful, false otherwise.
  186. Examples    FilemakerLib.getCellNRecordsAsString ("U.S. States", "State Name", 2, 3, foundSet:false) «Retrieve state names
  187.     » "Alaska\tArizona\tArkansas"
  188. FilemakerLib.getCellNRecordsAsString ("U.S. States", "State Name", 40, 15) «Ask for records that don’t exist
  189.     » false
  190. Notes    The values are tab-delimited.
  191. See Also    FilemakerLib.getCellNRecords
  192. FilemakerLib.setCellNRecords
  193.  
  194. Verb    FilemakerLib.getCellNthRecord
  195. Syntax    FilemakerLib.getCellNthRecord (db, theCell, recordNum, theLayout=0, foundSet=true)
  196. Parameters    db is the name or number of the database containing the cell to retrieve.
  197. theCell is the name of the cell whose value you want.
  198. recordNum is the index of the record containing the cell.
  199. theLayout (optional, default is 0) is the name or number of the layout.
  200. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false).
  201. Action    Retrieves the data for a specific cell in a specific record.
  202. Returns    True if the database was brought to front, false if it was not.
  203. Examples    FilemakerLib.getCellNthRecord ("U.S. States", "State Name", 2, foundSet:false)
  204.     » "Arizona"
  205. FilemakerLib.getCellNthRecord ("U.S. States", "State Name", 65) «We have only 50 states in the database
  206.     » false
  207. See Also    FilemakerLib.getCellNRecords
  208. FilemakerLib.getCellNRecordsAsString
  209. FilemakerLib.setCellNthRecord
  210.  
  211. Verb    FilemakerLib.getCellSize
  212. Syntax    FilemakerLib.getCellSize (db, theCell, recordNum, theLayout = 0, foundSet = true)
  213. Parameters    db is the name or number of the database containing the cell whose size you want to determine.
  214. theCell is the name of the cell whose size you want to determine.
  215. recordNum is the index of the record containing the cell.
  216. theLayout (optional, default is 0) is the name or number of the layout.
  217. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false).
  218. Action    Retrieves the size of a cell from Filemaker.
  219. Returns    A number if the request was successful, false if unsuccessful.
  220. Examples    FilemakerLib.getCellSize ("U.S. States", "State Name", 2) «"Maryland" is the second record in the current found set.
  221.     » 8
  222. FilemakerLib.getCellSize ("U.S. States", "State Name", 1, foundSet:false) «"Alabama" is the first record in the database
  223.     » 7
  224. See Also    FilemakerLib.getDBSize
  225. FilemakerLib.getRecordSize
  226.  
  227. Verb    FilemakerLib.getDBSize
  228. Syntax    FilemakerLib.getDBSize (db)
  229. Parameters    db is the name or number of the database whose size you want to determine.
  230. Action    Asks Filemaker to return the size of the specified database.
  231. Returns    A number if successful, false otherwise.
  232. Examples    FilemakerLib.getDBSize ("Non-existent database")
  233.     » false
  234. FilemakerLib.getDBSize ("My Database")
  235.     » 64860
  236. See Also    FilemakerLib.getCellSize
  237. FilemakerLib.getRecordSize
  238.  
  239. Verb    FilemakerLib.getFirstRecord
  240. Syntax    FilemakerLib.getFirstRecord (db, theLayout = 0, foundSet = true)
  241. Parameters    db is the name or number of the database containing the record.
  242. theLayout (optional, default is 0) is the name or number of the layout.
  243. foundSet (optional, default is true) specifies whether to return the first record of the current found set (true) or of the database (false).
  244. Action    Retrieves the data for the first record.
  245. Returns    A list of data if the request was successful, false otherwise.
  246. Examples    FilemakerLib.getFirstRecord ("U.S. States", foundSet: false)
  247.     » {"Alabama", "Huntsville", "Lobster"}
  248. FilemakerLib.getFirstRecord ("U.S. States") «"Delaware" is the first record in the current found set
  249.     » {"Delaware", "Dover", "Kingfish"}
  250. See Also    FilemakerLib.getLastRecord
  251. FilemakerLib.getNthRecord
  252.  
  253. Verb    FilemakerLib.getFrontDBName
  254. Syntax    FilemakerLib.getFrontDBName ()
  255. Parameters    None.
  256. Action    Gets the name of the frontmost database.
  257. Returns    The name of the frontmost database, or false if the request fails.
  258. Examples    FilemakerLib.getFrontDBName () « "My Database" is in front
  259.     » "My Database"
  260. Notes    This is a rarely-needed verb. The FilemakerLib verbs do not require the acted-upon database to be frontmost.
  261. See Also    FilemakerLib.bringDBToFront
  262. FilemakerLib.hideWindow
  263. FilemakerLib.showWindow
  264.  
  265. Verb    FilemakerLib.getID
  266. Syntax    FilemakerLib.getID (db, recordNum, foundSet = true)
  267. Parameters    db is the name or number of the database that contains the record.
  268. recordNum is the index of the record whose unique ID you want.
  269. foundSet (optional, default is true) specifies whether recordNum relates to the current found set (true) or the database (false).
  270. Action    Gets the unique ID of the specified record.
  271. Returns    A number, the unique ID.
  272. Examples    FilemakerLib.getID ("My Database", 1) «Get the unique ID of the first record in the found set.
  273.     » 84
  274. FilemakerLib.getID ("My Database", 4, false) «Get the unique ID of the fourth record in the database. 
  275.     » 7
  276. See Also    FilemakerLib.getRecordByID
  277. FilemakerLib.getCellByRecordID
  278. FilemakerLib.setRecordByID
  279. FilemakerLib.setCellByRecordID
  280.  
  281. Verb    FilemakerLib.getLastRecord
  282. Syntax    FilemakerLib.getLastRecord (db, theLayout = 0, foundSet = true)
  283. Parameters    db is the name or number of the database you want to make frontmost.
  284. theLayout (optional, default is 0) is the name or number of the layout.
  285. foundSet (optional, default is true) specifies whether to retrieve the last record in the current found set (true) or the last record in the database (false).
  286. Action    Retrieves the data for the last record.
  287. Returns    The data as a list.
  288. Examples    FilemakerLib.getLastRecord ("U.S. States", foundSet:false) «Get the last record in the database
  289.     » {"Wyoming", "Cheyenne", "No seafood"}
  290. See Also    FilemakerLib.getFirstRecord
  291. FilemakerLib.getNthRecord
  292.  
  293. Verb    FilemakerLib.getLayoutNames
  294. Syntax    FilemakerLib.getLayoutNames (db)
  295. Parameters    db is the name or number of the database containing the layouts whose names you want to get.
  296. Action    Asks Filemaker to return the names of the layouts.
  297. Returns    A list of the layout names, or false if the request is unsuccessful.
  298. Examples    FilemakerLib.getLayoutNames ("My Database") «Only has one default layout
  299.     » {"Layout #1"}
  300. FilemakerLib.getLayoutNames ("U.S. States", 2) «Has two layouts, both named
  301.     » {"States By Page", "States in Columns"}
  302. See Also    FilemakerLib.getCellNames
  303. FilemakerLib.getFrontDBName
  304.  
  305. Verb    FilemakerLib.getNRecords
  306. Syntax    FilemakerLib.getNRecords (db, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true)
  307. Parameters    db is the name or number of the database containing the records.
  308. firstRecord is the index of the first record to get.
  309. numRecordsToGet tells how many records to get.
  310. theLayout (optional, default is 0) is a name or number specifying the layout.
  311. foundSet (optional, default is true) specifies whether the records come from the current foundSet (true) or all records (false).
  312. Action    Retrieves the specified records.
  313. Returns    A list of Filemaker Pro records, or false if the request fails.
  314. Examples    FilemakerLib.getNRecords ("U.S. States", 2, 2, foundSet:false)
  315.     » {{"Alaska", "Juneau", "crabs"}, {"Arizona", "Phoenix", "prairie oysters"})
  316. FilemakerLib.getNRecords ("U.S. States", 1, 2) «After searching for states whose name begins with "M"
  317.     » {{"Maine", "Portland", "crabs"}, {"Maryland", "Annapolis", "crabs"})
  318. FilemakerLib.getNRecords ("U.S. States", 2, 2, foundSet:false)
  319.     » {{"Arizona", "Phoenix", "prairie oysters"})
  320. See Also    FilemakerLib.setNthRecord
  321. FilemakerLib.GetFirstRecord
  322. FilemakerLib.GetLastRecord
  323.  
  324. Verb    FilemakerLib.getNRecordsAsString
  325. Syntax    FilemakerLib.getNRecordsAsString (db, firstRecord, numRecordsToGet, theLayout = 0, foundSet = true)
  326. Parameters    db is the name or number of the database containing the records.
  327. firstRecord is the index of the first record to get.
  328. numRecordsToGet tells how many records to records to get.
  329. theLayout (optional, default is 0) is a name or number specifying the layout.
  330. foundSet (optional, default is true) specifies whether the records come from the current foundSet (true) or all records (false).
  331. Action    Retrieves the specified records.
  332. Returns    The specified Filemaker Pro records as a string, or false if the request fails.
  333. Examples    FilemakerLib.getNRecords ("U.S. States", 2, 2, foundSet:false)
  334.     » "Alaska\tJuneau\tcrabs\rArizona\tPhoenix\tprairie oysters\r"
  335. Notes    Cells are tab-delimited. A return appears after every record.
  336. See Also    FilemakerLib.getNRecords
  337.  
  338. Verb    FilemakerLib.getNthRecord
  339. Syntax    FilemakerLib.getNthRecord (db, recordNum, theLayout = 0, foundSet = true)
  340. Parameters    db is the name or number of the database containing the data.
  341. recordNum is the index of the record to retrieve.
  342. theLayout (optional, default is 0) is the name or number of the layout.
  343. foundSet (optional, default is true) specifies whether recordNum relates to the current found set (true) or to the database itself (false).
  344. Action    Retrieves the contents of the specified record.
  345. Returns    A list containing the data for the specified record, or false if the request fails.
  346. Examples    FilemakerLib.getNthRecord ("My Contacts", 2, foundSet:false) «Retrieves the second record in the database
  347.     » {"Smith", "John", "206-555-1212", "Denny Regrade"}
  348. FilemakerLib.getNthRecord ("My Contacts", 10) «There are only 7 records in the current found set
  349.     » false
  350. See Also    FilemakerLib.getNRecords
  351. FilemakerLib.getRecordByID
  352. FilemakerLib.setNthRecord
  353.  
  354. Verb    FilemakerLib.getRecordByID
  355. Syntax    FilemakerLib.getRecordByID (db, recordID, theLayout = 0)
  356. Parameters    db is the name or number of the database containing the record.
  357. recordID is the unique ID of the record containing the desired data.
  358. theLayout (optional, default is 0) is the name or number of the layout.
  359. Action    Retrieves the data for the requested record.
  360. Returns    A list of data, or false if the request fails.
  361. Examples    FilemakerLib.getRecordByID ("My Contacts", 227)
  362.     » {"Doe", "Jane", "212-555-1212", "Faroe Heights"}
  363. FilemakerLib.getRecordByID ("My Contacts", 154) «There is no record with this unique ID
  364.     » false
  365. See Also    FilemakerLib.getID
  366. FilemakerLib.setRecordByID
  367.  
  368. Verb    FilemakerLib.getRecordSize
  369. Syntax    FilemakerLib.getRecordSize (db, recordNum, theLayout = 0, foundSet = true)
  370. Parameters    db is the name or number of the database containing the record.
  371. recordNum is the index of the record whose size you want to determine.
  372. theLayout (optional, default is 0) is the name or number of the layout.
  373. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false).
  374. Action    Retrieves the size of the specified record.
  375. Returns    A number if the request was successful, false otherwise.
  376. Examples    FilemakerLib.getRecordSize ("My Database", 126) «There are less than 126 records in the current found set
  377.     » false
  378. FilemakerLib.getRecordSize ("My Database", 126, foundSet: false) «There are more than 126 records in the entire database
  379.     » 3248
  380. See Also    FilemakerLib.getCellSize
  381. FilemakerLib.getDBSize
  382.  
  383. Verb    FilemakerLib.hideWindow
  384. Syntax    FilemakerLib.hideWindow (db)
  385. Parameters    db is the name or number of the database whose window you want to hide.
  386. Action    Hides the specified database’s window.
  387. Returns    True.
  388. Examples    FilemakerLib.hideWindow (1) «Hides the frontmost database.
  389.     » true
  390. FilemakerLib.bringDBToFront ("U.S. States") «Hides the specified database.
  391.     » true
  392. Notes    On web-servers, it’s common to want to hide Filemaker’s windows. This improves Filemaker’s performance.
  393. See Also    FilemakerLib.showWindow
  394.  
  395. Verb    FilemakerLib.isRunning
  396. Syntax    FilemakerLib.isRunning ()
  397. Parameters    None.
  398. Action    Checks if Filemaker is running.
  399. Returns    True if Filemaker is running, false if it is not.
  400. See Also    FilemakerLib.launch
  401. FilemakerLib.quit
  402.  
  403. Verb    FilemakerLib.launch
  404. Syntax    FilemakerLib.launch ()
  405. Parameters    None.
  406. Action    Launches Filemaker Pro.
  407. Returns    True if request succeeds, false otherwise.
  408. Examples    FilemakerLib.launch ()
  409.     » true
  410. See Also    FilemakerLib.quit
  411.  
  412. Verb    FilemakerLib.lockDB
  413. Syntax    FilemakerLib.lockDB (db, timeOut = 3600)
  414. Parameters    db is the name or number of the database you want to temporarily lock.
  415. timeOut (optional, default is 3600) is the number of ticks (60ths of a second) to keep trying to lock the database.
  416. Action    Prevents other threads from accessing the database and interfering with your script.
  417. Returns    True if successful, false otherwise.
  418. Examples    FilemakerLib.lockDB ("My Database")
  419.     » true
  420. Notes    This verb is the equivalent of calling semaphores.lock (db, 3600).
  421. Always surround this verb with a try...else statement. If your script cannot lock the database, your script should return an error.
  422. Use the lockDB and unlockDB verbs whenever more than one thread might access the Filemaker database.
  423. See Also    FilemakerLib.unlockDB
  424.  
  425. Verb    FilemakerLib.newRecord
  426. Syntax    FilemakerLib.newRecord (db, dataList = {}, theLayout = 0)
  427. Parameters    db is the name or number of the database in which a new record will be created.
  428. dataList (optional, default is an empty list) is the data to place in the new record. If dataList is empty, the new record will also be empty.
  429. theLayout (optional parameter) is the name or number of the layout.
  430. Action    Creates a new record at the end of the specified Filemaker database.
  431. Returns    True if successful, false otherwise.
  432. Examples    FilemakerLib.newRecord ("U.S. States", {"Puerto Rico", "San Juan", "Marlin"}) «Puerto Rico has been added as the 51st state.
  433.     » true
  434. See Also    FilemakerLib.setNthRecord
  435.  
  436. Verb    FilemakerLib.nthRecordExists
  437. Syntax    FilemakerLib.nthRecordExists (db, recordNum, foundSet = true)
  438. Parameters    db is the name or number of the database containing the record.
  439. recordNum is the index of the record whose existence we want to determine.
  440. foundSet (optional, default is true) specifies whether recordNum applies to the current found set (true) or to the database (false).
  441. Action    Checks to see if the specified record exists.
  442. Returns    True if the record exists, false if it does not.
  443. Examples    FilemakerLib.recordExists ("My Database", 8474, false) «"My Database" has fewer than 8474 records
  444.     » false
  445. FilemakerLib.recordExists ("My Database", 3) «There is a third record in the current found set
  446.     » true
  447.  
  448. Verb    FilemakerLib.open
  449. Syntax    FilemakerLib.open (dbPath)
  450. Parameters    dbPath is the path to the database to be opened.
  451. Action    Opens the specified database in Filemaker.
  452. Returns    True if successful, false otherwise.
  453. Examples    FilemakerLib.open ("Macintosh HD:Databases:My Database") «Opens my database
  454.     » true
  455. See Also    FilemakerLib.openDocument
  456. FilemakerLib.close
  457.  
  458. Verb    FilemakerLib.openDocument
  459. Syntax    FilemakerLib.openDocument (dbPath)
  460. Parameters    dbPath is the path to the database to be opened.
  461. Action    Opens the specified database in Filemaker.
  462. Returns    True if successful, false otherwise.
  463. Examples    FilemakerLib.openDocument ("Macintosh HD:Databases:My Database") «Opens my database
  464.     » true
  465. See Also    FilemakerLib.open
  466. FilemakerLib.close
  467.  
  468. Verb    FilemakerLib.openFilemakerFolder
  469. Syntax    FilemakerLib.openFilemakerFolder ()
  470. Parameters    None.
  471. Action    Opens the folder containing Filemaker Pro.
  472. Returns    True if successful, false otherwise.
  473. Examples    FilemakerLib.openFilemakerFolder ()
  474.     » true
  475.  
  476. Verb    FilemakerLib.packDB
  477. Syntax    FilemakerLib.packDB (dbPath, adrTable)
  478. Parameters    db is the name or number of the database you want to pack into your Frontier root.
  479. adrTable is the address of the Frontier table in which to pack the database.
  480. Action    Packs the database as a binary object into the specified table in the Frontier root.
  481. Returns    True if successful, false otherwise.
  482. Examples    FilemakerLib.packDB ("Macintosh HD:Database:My Database", @user.databases) «pack "My Database" into user.databases table
  483.     » true
  484. See Also    FilemakerLib.unpackDB
  485.  
  486. Verb    FilemakerLib.quit
  487. Syntax    FilemakerLib.quit ()
  488. Parameters    None.
  489. Action    Quits Filemaker Pro.
  490. Returns    True if the request is successful, false otherwise.
  491. See Also    FilemakerLib.launch
  492.  
  493. Verb    FilemakerLib.sendToBack
  494. Syntax    FilemakerLib.sendToBack ()
  495. Parameters    None.
  496. Action    Hides Filemaker in the background.
  497. Returns    True if successful, false otherwise.
  498. See Also    FilemakerLib.bringToFront
  499.  
  500. Verb    FilemakerLib.setCellByRecordID
  501. Syntax    FilemakerLib.setCellByRecordID (db, dataString, theCell, recordID, theLayout=0)
  502. Parameters    db is the name or number of the database containing the records.
  503. dataString is the string to which the contents of the cell will be set.
  504. theCell is the name of the cell.
  505. recordID is the unique ID of the record.
  506. theLayout (optional, default is 0) is the name or number of the layout.
  507. Action    Sets data for the specified cell in the specified record.
  508. Returns    True if successful, false otherwise.
  509. Examples    FilemakerLib.setCellByRecordID ("U.S. States", "Mississippi", 22) «The unique ID of Mississippi’s record is 22
  510.     » true
  511. See Also    FilemakerLib.getCellByRecordID
  512.  
  513. Verb    FilemakerLib.setCellNRecords
  514. Syntax    FilemakerLib.setCellNRecords (db, dataString, theCell, firstRecord, numRecordsToSet, theLayout = 0, foundSet = true)
  515. Parameters    db is the name or number of the database containing of the records.
  516. dataString is the data to which the cells will be set.
  517. firstRecord is the index of the first record.
  518. numRecordsToSet is the number of records.
  519. theLayout (optional, default is 0) is the name or number of the layout.
  520. foundSet (optional, default is true) determines whether records in the current found set will be set (true) or records in the database (false).
  521. Action    Sets a cell in multiple records to the specified data.
  522. Returns    True if successful, false otherwise.
  523. Examples    FilemakerLib.setCellNRecords ("U.S. States", "Lobster", "Seafood Specialty", 2, 5) « Sets cell "Seafood Specialty" to "Lobster" for records 2 through 7 of the current found set
  524.     » true
  525. See Also    FilemakerLib.getCellNRecords
  526. FilemakerLib.setCellNthRecord
  527.  
  528. Verb    FilemakerLib.setCellNthRecord
  529. Syntax    FilemakerLib.setCellNthRecord (db, recordNum, theCell, theData, theLayout=0, foundSet=true)
  530. Parameters    db is the name or number of the database you want to make frontmost.
  531. recordNum is the index of the record containing the cell whose data will be set.
  532. theCell is the name of the cell whose data will be set.
  533. theData is the data to which the cell will be set.
  534. theLayout (optional, default is 0) is the name or number of the layout.
  535. foundSet (optional, default is true) determines whether recordNum applies to the current found set (true) or to the database (false).
  536. Action    Sets the data for a specified cell in a specified record.
  537. Returns    True if successful, false otherwise.
  538. Examples    FilemakerLib.setCellNthRecord ("U.S. States", 16, "StateName", "Mystery State", foundSet:false) «Change the name of state 16 (Kansas) to "Mystery State"
  539.     » true
  540. See Also    FilemakerLib.getCellNRecords
  541.  
  542. Verb    FilemakerLib.setNthRecord
  543. Syntax    FilemakerLib.setNthRecord (db, recordNum, dataList, theLayout = 0, foundSet = true)
  544. Parameters    db is the name or number of the database containing the record.
  545. recordNum is the index of the record whose data you want to set.
  546. dataList is the list of data to be set.
  547. theLayout (optional, default is 0) specifies which layout.
  548. foundSet (optional, default is true) specifies whether or not recordNum applies to the current found set or to the database.
  549. Action    Sets the data for the specified record.
  550. Returns    True if successful, false otherwise.
  551. Examples    FilemakerLib.setNthRecord ("U.S. States", 3, {"Arizona", "Phoenix"}, foundSet:false) «Sets the data for the 3rd record in the database
  552.     » true
  553. See Also    FilemakerLib.getNthRecord
  554. FilemakerLib.setRecordByID
  555.  
  556. Verb    FilemakerLib.setRecordByID
  557. Syntax    FilemakerLib.setRecordByID (db, recordID, dataList, theLayout = 0)
  558. Parameters    db is the name or number of the database containing the record.
  559. theLayout (optional, default is 0) is the name or number of the layout.
  560. recordID is the unique ID of the record whose data you want to set.
  561. dataList is a list of data to set. Items should be in the same order as the creation order of fields.
  562. theLayout (optional parameter) is the name or number of the layout.
  563. Action    Sets the data for a record.
  564. Returns    True if successful, false otherwise.
  565. Examples    FilemakerLib.setRecordByID ("My Contacts", 2, {"Smith", "John", "206-555-1212"}) «Sets the data for the record whose unique ID is 2.
  566.     » true
  567. See Also    FilemakerLib.getID
  568. FilemakerLib.setCellByRecordID
  569. FilemakerLib.getRecordByID
  570. FilemakerLib.getCellByRecordID
  571.  
  572. Verb    FilemakerLib.showWindow
  573. Syntax    FilemakerLib.showWindow (db)
  574. Parameters    db is the name or number of the database whose window you want to make visible.
  575. Action    Makes the specified database’s window visible.
  576. Returns    True if the request succeeded, false otherwise.
  577. Examples    FilemakerLib.showWindow ("My Database") «Makes "My Database" visible
  578.     » true
  579. Notes    On web-servers, it’s common to want to hide Filemaker’s windows. This improves Filemaker’s performance.
  580. See Also    FilemakerLib.hideWindow
  581.  
  582. Verb    FilemakerLib.simpleFind
  583. Syntax    FilemakerLib.simpleFind (db, searchString, theCell, theLayout = 0)
  584. Parameters    db is the name or number of the database to search.
  585. searchString is the string to be found in theCell.
  586. theCell is the name of the cell in which to search.
  587. theLayout (optional, default is 0) is the name or number of the layout.
  588. Action    Retrieves all records matching the search criteria.
  589. Returns    A list of data, or false if no records match the criteria.
  590. Examples    FilemakerLib.simpleFind ("U.S. States", "Ala", "State Name")
  591.     » {{"Alabama", "Huntsville", "Lobster"}, {"Alaska", "Juneau", "Crabs"}}
  592. Notes    This verb is most suited to small, flat databases. Larger and more complex databases should use FilemakerLib.find, which will be faster despite sending more Apple events.
  593. See Also    FilemakerLib.find
  594.  
  595. Verb    FilemakerLib.sort
  596. Syntax    FilemakerLib.sort (db, sortBy, theLayout = 0)
  597. Parameters    db is the name or number of the database you want to sort.
  598. sortBy is the name or number of the field you want to sort by.
  599. theLayout (optional, default is 0) can be a specific layout.
  600. Action    Sorts the database in ascending order by the field specified.
  601. Returns    True if the request was successful, false otherwise.
  602. Examples    FilemakerLib.sort ("U.S. States", "State Name") «Sort by state
  603.     » true
  604. FilemakerLib.sort (1, 2) «Sort the frontmost database by its second field
  605.     » true
  606. Notes    This is a very simple sort. For more complex sorting, use this script as an example and see filemaker.sort.
  607. See Also    FilemakerLib.unsort
  608.  
  609. Verb    FilemakerLib.unlockDB
  610. Syntax    FilemakerLib.unlockDB (db)
  611. Parameters    db is the name or number of the database you want to unlock.
  612. Action    Allows other threads to send events to Filemaker that manipulate the specified database.
  613. Returns    True.
  614. Examples    FilemakerLib.unlockDB ("My Database") «Allows other threads to interact with "My Database"
  615.     » true
  616. Notes    This verb is the equivalent of calling semaphores.unlock (db). 
  617. See Also    FilemakerLib.lockDB
  618.  
  619. Verb    FilemakerLib.unpackDB
  620. Syntax    FilemakerLib.unpackDB (adrDatabase, folderPath)
  621. Parameters    adrDatabase is the address of a Filemaker database packed as a binary object in the Frontier.root.
  622. folderPath is the path to the destination folder.
  623. Action    Places an unpacked copy of the database on your hard drive in the specified folder.
  624. Returns    True if the request was successful, false otherwise.
  625. Examples    FilemakerLib.unpackDB (@user.databases.myDatabase, "Macintosh HD:Databases:") «Unpacks "My Database" and places it in my databases folder.
  626.     » true
  627. See Also    FilemakerLib.packDB
  628.  
  629. Verb    FilemakerLib.unsort
  630. Syntax    FilemakerLib.unsort (db)
  631. Parameters    db is the name or number of the database you want to unsort.
  632. Action    Unsorts the database.
  633. Returns    True if successful, false if the request failed.
  634. Examples    FilemakerLib.unsort ("My Database")
  635.     » true
  636. See Also    FilemakerLib.sort
  637.